package com.kaver.sso.dao.service.impl;

import com.kaver.sso.dao.po.SsoUserRole;
import com.kaver.sso.dao.mapper.SsoUserRoleMapper;
import com.kaver.sso.dao.service.SsoUserRoleDao;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户角色 服务实现类
 * </p>
 *
 * @author roc
 * @since 2021-08-06
 */
@Service
public class SsoUserRoleDaoImpl extends ServiceImpl<SsoUserRoleMapper, SsoUserRole> implements SsoUserRoleDao {

	@Override
	public int queryRoleUserCount(Long roleId) {
		SsoUserRole query = new SsoUserRole();
		query.setRoleId(roleId);
		QueryWrapper<SsoUserRole> queryWrapper = new QueryWrapper<SsoUserRole>(query);
		return this.count(queryWrapper);
	}

}
